package com.limh.blehelper.event;

import android.bluetooth.BluetoothDevice;

/**
 * Function:
 * author: limh
 * time:2018/1/29
 */

public class ConnectEvent {
    /**
     * 开始链接
     */
    public static final int CONN_START = 0X11;
    /**
     * 连接成功
     */
    public static final int CONN_SUCCESS = 0X12;
    /**
     * 连接失败
     */
    public static final int CONN_FAIL = 0X13;
    /**
     * 断开连接
     */
    public static final int CONN_DISCONN = 0X14;

    private int connStatus;
    private BluetoothDevice device;
    private String message;

    public ConnectEvent(int connStatus) {
        this.connStatus = connStatus;
    }

    public ConnectEvent(int connStatus, BluetoothDevice device) {
        this.connStatus = connStatus;
        this.device = device;
    }

    public ConnectEvent(int connStatus, String message) {
        this.connStatus = connStatus;
        this.message = message;
    }

    public int getConnStatus() {
        return connStatus;
    }

    public ConnectEvent setConnStatus(int connStatus) {
        this.connStatus = connStatus;
        return this;
    }

    public BluetoothDevice getDevice() {
        return device;
    }

    public ConnectEvent setDevice(BluetoothDevice device) {
        this.device = device;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public ConnectEvent setMessage(String message) {
        this.message = message;
        return this;
    }
}
